#ifndef __POWER_METHOD
#define __POWER_METHOD


#include "../common/sparse_matrix.h"
#include "../common/matrix_op.h"
#include "../modularity_mat/modularity_mat.h"

void fast_power_method(ModularityMatrix* Bg,elem precision,
					   Vector* eigen_vector, elem* eigen_value);

elem approximate_eigenvalue(Vector* next_x, Vector* x);

void fast_power_method_iteration(Vector* result,Vector* x, sparse_matrix_arr* adj_matrix_g, 
									Vector* Kg, Vector* f,elem M, elem Bg_norm_one);

int is_precise_enough(Vector* next_x,Vector* x,elem lambda,elem precision);

#endif /* __POWER_METHOD */
